-- GENERATED SPELL FOR [Mechanar Tinkerer] --


function spell0_19716(pUnit, Event) --@Maniacal Charge,n/a--
pUnit:FullCastSpellOnTarget(35062,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19716', 590, 1)
end

function spell1_19716(pUnit, Event) --@Nether Explosion,Self--
pUnit:FullCastSpellOnTarget(35058,pUnit)
pUnit:RegisterEvent('Sorts_19716', 1000, 1)
end

function spell2_19716(pUnit, Event) --@Netherbomb,n/a--
pUnit:FullCastSpellOnTarget(35057,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19716', 1000, 1)
end

function spell3_19716(pUnit, Event) --@Netherbomb,n/a--
pUnit:FullCastSpellOnTarget(38925,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19716', 1000, 1)
end

function Sorts_19716(pUnit, Event)
local choix_sorts_19716 = math.random(0, 3)
if choix_sorts_19716 == 0 then
pUnit:RegisterEvent('spell0_19716', 1, 1)
end
if choix_sorts_19716 == 1 then
pUnit:RegisterEvent('spell1_19716', 1, 1)
end
if choix_sorts_19716 == 2 then
pUnit:RegisterEvent('spell2_19716', 1, 1)
end
if choix_sorts_19716 == 3 then
pUnit:RegisterEvent('spell3_19716', 1, 1)
end
end

function mob19716_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19716', math.random(1500, 3000), 1)
end

function mob19716_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19716_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19716_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19716, 1, 'mob19716_Action')
RegisterUnitEvent(19716, 2, 'mob19716_Leave')
RegisterUnitEvent(19716, 3, 'mob19716_Kill')
RegisterUnitEvent(19716, 4, 'mob19716_Die')
